import 'package:flutter/material.dart';
import 'package:hook_up_rent/utils/index.dart';
import 'package:hook_up_rent/widgets/common_image.dart';

import 'data.dart';

var textStyle = TextStyle(color: ColorsUtil.hexColor(0x7e7d7e));

class InfoListItem extends StatelessWidget {

  final InfoItem infoItem;

  const InfoListItem(this.infoItem, {Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      height: 100.0,
      padding: EdgeInsets.all(10.0),
      child: Row(
        children: [
          CommonImage(infoItem.imageUrl,width: 120.0,height: 90.0,),
          Expanded(
              child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceBetween,
              children: [
                Text(infoItem.title,style: TextStyle(fontWeight: FontWeight.w600),),
                Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(infoItem.source,style: textStyle),
                    Text(infoItem.time,style: textStyle)
                  ],
                )
              ],
            ),
          )
        ],
      ),
    );
  }
}